#pragma once
#ifdef FAXUSBMANAGER_EXPORTS
#define FAXUSBMANAGER_API __declspec(dllexport)
#else
#define FAXUSBMANAGER_API __declspec(dllimport)
#endif
#include "AppConfig.h"
#include <map>
#include <string>
using namespace std;

class AppConfigManager
{
public:
	AppConfigManager(void);
	~AppConfigManager(void);
	BOOL GetConfigBySerialNumber(char *serialNum, AppConfig &config);
	void InitFileToBackup(const char* appName, AppConfig* appConfig);
	//BOOL GetConfigByAppName(char *appName, AppConfig &config);
	//BOOL GetAvailableAppList(APP_CONFIG_NAME_LIST &appConfigNameList);
private:
	BOOL FileExist(char *filePathName);
	void InitConfigFilePathName();
	map<USHORT, AppConfig> m_configMap;
	char m_configFilePathName[MAX_PATH];
};

extern AppConfigManager g_appConfigManager;

